#ifndef MAZE_H
#define MAZE_H

#include <QObject>
#include <QVector>

class Maze
{
public:
    Maze(int w, int h);

    bool isWall(int x, int y) const;
    bool isExit(int x, int y) const;
    int getWidth() const;
    int getHeight() const;

private:
    QVector<QVector<bool>> walls;
    int editX;
    int editY;
    // 改进迷宫生成方案, ?深度优先搜索（DFS）算法
    void generateMaze(int x, int y);
    QVector<QPoint> getNeighbors(int x, int y);
};

#endif // MAZE_H
